<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>人生时光轴 | 记录生命轨迹</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* 优化配色方案 */
            --color01: #534739; /* 深棕色 */
            --color02: #9E8774; /* 棕褐色 */
            --color03: #F0F2F1; /* 米白色 */
            --color04: #1F2D33; /* 深青色 */
            --color05: #0D0D0C; /* 近黑色 */
            
            /* 增强玻璃质感 */
            --glass: rgba(240, 242, 241, 0.85);
            --glass-border: rgba(255, 255, 255, 0.4);
            --glass-shadow: rgba(83, 71, 57, 0.25);
            
            /* 动画效果 */
            --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #F0F2F1 0%, #e8eaea 100%);
            color: var(--color01);
            min-height: 100vh;
            overflow-x: hidden;
            padding: 0;
            background-image: url('');
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 顶部导航栏 - 增强玻璃效果 */
        .navbar {
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 30px;
            background: var(--glass);
            backdrop-filter: blur(12px) saturate(180%);
            -webkit-backdrop-filter: blur(12px) saturate(180%);
            border-radius: 0 0 20px 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 20px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            border-top: none;
            transition: var(--transition);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-icon {
            font-size: 28px;
            color: var(--color04);
            animation: pulse 2s infinite;
        }

        .logo-text {
            font-size: 24px;
            font-weight: 600;
            letter-spacing: 1px;
            background: linear-gradient(45deg, var(--color05), var(--color01));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
        }

        /* 导航链接 */
        .nav-toggle {
            display: none;
            font-size: 24px;
            color: var(--color01);
            cursor: pointer;
            z-index: 101;
        }

        .nav-links {
            display: flex;
            gap: 20px;
        }

        .nav-link {
            text-decoration: none;
            color: var(--color01);
            font-size: 16px;
            font-weight: 500;
            padding: 8px 14px;
            border-radius: 50px;
            transition: var(--transition);
            position: relative;
        }

        .nav-link:hover {
            background: rgba(255, 255, 255, 0.3);
            color: var(--color04);
        }

        .nav-link.active {
            background: rgba(158, 135, 116, 0.2);
            color: var(--color04);
        }

        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 6px;
            height: 6px;
            background: var(--color04);
            border-radius: 50%;
        }

        .user-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .search-box {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 50px;
            padding: 6px 12px;
            transition: var(--transition);
        }

        .search-box:hover {
            background: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 15px rgba(158, 135, 116, 0.2);
        }

        .search-box input {
            background: transparent;
            border: none;
            outline: none;
            padding: 5px 10px;
            width: 160px;
            color: var(--color01);
            font-size: 15px;
        }

        .search-box i {
            color: var(--color02);
        }

        .user-profile {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(45deg, var(--color02), var(--color01));
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--color03);
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 12px var(--glass-shadow);
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .user-profile::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: 0.5s;
        }

        .user-profile:hover::before {
            left: 100%;
        }

        .user-profile:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 18px rgba(83, 71, 57, 0.35);
        }

        /* 主内容区 */
        .main-content {
            margin-bottom: 40px;
        }

        /* 右侧内容区 - 增强玻璃效果 */
        .content-area {
            background: var(--glass);
            backdrop-filter: blur(12px) saturate(180%);
            -webkit-backdrop-filter: blur(12px) saturate(180%);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 8px 32px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            animation: fadeIn 0.8s ease-out;
        }

        .welcome-section {
            margin-bottom: 30px;
            text-align: center;
            padding: 30px;
            background: rgba(255, 255, 255, 0.4);
            border-radius: 15px;
            backdrop-filter: blur(5px);
            border: 1px solid var(--glass-border);
            position: relative;
            overflow: hidden;
        }

        .welcome-section::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
            z-index: -1;
        }

        .welcome-title {
            font-size: 32px;
            margin-bottom: 12px;
            background: linear-gradient(45deg, var(--color05), var(--color01));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
        }

        .welcome-subtitle {
            font-size: 18px;
            color: var(--color02);
            margin: 0 auto 25px;
            max-width: 800px;
            line-height: 1.6;
        }

        /* 快捷操作按钮 */
        .action-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .action-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 25px;
            border-radius: 50px;
            background: linear-gradient(135deg, var(--color02), var(--color01));
            color: var(--color03);
            border: none;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 12px var(--glass-shadow);
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .action-btn::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -60%;
            width: 20px;
            height: 200%;
            background: rgba(255,255,255,0.3);
            transform: rotate(25deg);
            transition: all 0.6s;
            z-index: -1;
        }

        .action-btn:hover::after {
            left: 120%;
        }

        .action-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(83, 71, 57, 0.35);
        }

        .action-btn.secondary {
            background: transparent;
            color: var(--color01);
            border: 1px solid var(--color02);
        }

        .action-btn.secondary:hover {
            background: rgba(158, 135, 116, 0.15);
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.65);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 4px 20px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            transition: var(--transition);
            backdrop-filter: blur(5px);
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--color02), var(--color01));
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.5s ease;
        }

        .stat-card:hover::before {
            transform: scaleX(1);
        }

        .stat-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 30px var(--glass-shadow);
        }

        .stat-icon {
            width: 55px;
            height: 55px;
            border-radius: 15px;
            background: linear-gradient(135deg, var(--color03), #e0e2e1);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            font-size: 22px;
            color: var(--color04);
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }

        .stat-value {
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 3px;
            color: var(--color05);
        }

        .stat-label {
            font-size: 15px;
            color: var(--color02);
            font-weight: 500;
        }

        .recent-entries {
            background: rgba(255, 255, 255, 0.6);
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 4px 20px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(5px);
        }

        .entries-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .entries-title {
            font-size: 24px;
            color: var(--color05);
            position: relative;
            display: inline-block;
        }

        .entries-title::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 50px;
            height: 3px;
            background: linear-gradient(90deg, var(--color02), var(--color01));
            border-radius: 2px;
        }

        .view-all {
            color: var(--color04);
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: var(--transition);
            padding: 6px 12px;
            border-radius: 20px;
        }

        .view-all:hover {
            gap: 12px;
            color: var(--color01);
            background: rgba(158, 135, 116, 0.1);
        }

        .timeline-container {
            max-height: 500px;
            overflow-y: auto;
            padding-right: 15px;
        }

        .timeline-container::-webkit-scrollbar {
            width: 6px;
        }

        .timeline-container::-webkit-scrollbar-track {
            background: rgba(158, 135, 116, 0.1);
            border-radius: 10px;
        }

        .timeline-container::-webkit-scrollbar-thumb {
            background: linear-gradient(to bottom, var(--color02), var(--color01));
            border-radius: 10px;
        }

        .timeline {
            position: relative;
            padding-left: 30px;
            margin-left: 15px;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 0;
            top: 10px;
            height: calc(100% - 20px);
            width: 3px;
            background: linear-gradient(to bottom, var(--color02), var(--color01));
            border-radius: 3px;
        }

        .timeline-item {
            position: relative;
            margin-bottom: 25px;
            padding-left: 30px;
            transition: var(--transition);
            opacity: 0;
            transform: translateY(20px);
            animation: fadeUp 0.6s forwards;
        }

        .timeline-item:nth-child(1) { animation-delay: 0.1s; }
        .timeline-item:nth-child(2) { animation-delay: 0.2s; }
        .timeline-item:nth-child(3) { animation-delay: 0.3s; }
        .timeline-item:nth-child(4) { animation-delay: 0.4s; }
        .timeline-item:nth-child(5) { animation-delay: 0.5s; }
        .timeline-item:nth-child(6) { animation-delay: 0.6s; }

        .timeline-item:hover {
            transform: translateX(8px);
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 8px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--color02);
            border: 3px solid var(--color03);
            box-shadow: 0 0 0 3px rgba(158, 135, 116, 0.3);
            transition: var(--transition);
            z-index: 2;
        }

        .timeline-item:hover::before {
            transform: scale(1.2);
            box-shadow: 0 0 0 6px rgba(158, 135, 116, 0.3);
        }

        .timeline-date {
            font-weight: 600;
            color: var(--color04);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .timeline-date i {
            font-size: 14px;
        }

        .timeline-content {
            background: rgba(255, 255, 255, 0.8);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 15px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .timeline-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 5px;
            height: 100%;
            background: linear-gradient(to bottom, var(--color02), var(--color01));
        }

        .timeline-content:hover {
            box-shadow: 0 8px 25px rgba(83, 71, 57, 0.25);
            transform: translateY(-3px);
        }

        .timeline-title {
            font-size: 18px;
            margin-bottom: 10px;
            color: var(--color05);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .timeline-title i {
            color: var(--color02);
        }

        .timeline-desc {
            color: var(--color01);
            line-height: 1.7;
            font-size: 15px;
        }

        /* 新增记录表单 */
        .add-entry-form {
            background: rgba(255, 255, 255, 0.7);
            border-radius: 15px;
            padding: 25px;
            margin-top: 30px;
            box-shadow: 0 4px 15px var(--glass-shadow);
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(5px);
            display: none;
        }

        .form-title {
            font-size: 20px;
            margin-bottom: 20px;
            color: var(--color04);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--color01);
        }

        .form-control {
            width: 100%;
            padding: 12px 15px;
            border-radius: 10px;
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.6);
            font-size: 15px;
            color: var(--color01);
            transition: var(--transition);
        }

        .form-control:focus {
            outline: none;
            border-color: var(--color02);
            box-shadow: 0 0 0 3px rgba(158, 135, 116, 0.2);
        }

        .form-actions {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }

        .btn {
            padding: 10px 25px;
            border-radius: 50px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            border: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--color02), var(--color01));
            color: var(--color03);
            box-shadow: 0 4px 12px var(--glass-shadow);
        }

        .btn-secondary {
            background: transparent;
            color: var(--color01);
            border: 1px solid var(--color02);
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 18px rgba(83, 71, 57, 0.3);
        }

        /* 动画定义 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* 响应式设计 */
        @media (max-width: 1024px) {
            .nav-links {
                gap: 15px;
            }

            .nav-link {
                font-size: 15px;
                padding: 6px 12px;
            }
        }

        @media (max-width: 768px) {
            .nav-toggle {
                display: block;
            }

            .nav-links {
                position: fixed;
                top: 80px;
                right: -100%;
                flex-direction: column;
                background: var(--glass);
                backdrop-filter: blur(12px) saturate(180%);
                padding: 25px 30px;
                border-radius: 15px 0 0 15px;
                box-shadow: -5px 0 15px var(--glass-shadow);
                transition: right 0.4s ease;
                z-index: 99;
                border: 1px solid var(--glass-border);
                gap: 15px;
            }

            .nav-links.active {
                right: 0;
            }

            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }

            .content-area {
                padding: 20px;
            }
            
            .welcome-section {
                padding: 25px 15px;
            }
            
            .welcome-title {
                font-size: 28px;
            }
            
            .welcome-subtitle {
                font-size: 16px;
            }
        }

        @media (max-width: 480px) {
            .stats-container {
                grid-template-columns: 1fr;
            }

            .navbar {
                padding: 12px 15px;
            }

            .logo-text {
                font-size: 20px;
            }

            .search-box {
                display: none;
            }

            .welcome-title {
                font-size: 24px;
            }

            .action-buttons {
                gap: 12px;
            }

            .action-btn {
                padding: 10px 20px;
                font-size: 14px;
            }
            
            .nav-links {
                top: 70px;
            }
            
            .stat-card {
                padding: 20px;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 顶部导航栏 -->
        <nav class="navbar">
            <div class="logo">
                <div class="logo-icon">
                    <i class="fas fa-hourglass-half"></i>
                </div>
                <div class="logo-text">人生时光轴</div>
            </div>

            <!-- 移动端菜单按钮 -->
            <div class="nav-toggle">
                <i class="fas fa-bars"></i>
            </div>

            <div class="nav-links">
                <a href="#" class="nav-link">时光轨迹</a>
                <a href="#" class="nav-link">生命记录</a>
                <a href="#" class="nav-link">记忆中心</a>
                <a href="#" class="nav-link">蓝图规划</a>
                <a href="#" class="nav-link">人物自传</a>
                <a href="#" class="nav-link">时空胶囊</a>
            </div>

            <div class="user-actions">
                <div class="search-box">
                    <i class="fas fa-search"></i>
                    <input type="text" placeholder="搜索时光记忆...">
                </div>
                <div class="user-profile">S</div>
            </div>
        </nav>

        <!-- 主内容区 -->
        <div class="main-content">
            <!-- 右侧内容区 -->
            <div class="content-area">
                <div class="welcome-section">
                    <h1 class="welcome-title">记录生命中的每一刻</h1>
                    <p class="welcome-subtitle">人生时光轴帮助您捕捉、整理和回顾生命中的重要时刻，将记忆转化为永恒的故事，让您的人生旅程清晰可见。</p>

                    <div class="action-buttons">
                        <button class="action-btn" id="addEntryBtn">
                            <i class="fas fa-plus"></i> 新增记录
                        </button>
                        <button class="action-btn secondary">
                            <i class="fas fa-magic"></i> 智能回顾
                        </button>
                        <button class="action-btn secondary">
                            <i class="fas fa-chart-line"></i> 人生统计
                        </button>
                    </div>
                </div>

                <div class="stats-container">
                    <div class="stat-card">
                        <div class="stat-icon">
                            <i class="fas fa-calendar-alt"></i>
                        </div>
                        <div class="stat-value">1,428</div>
                        <div class="stat-label">记录的天数</div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon">
                            <i class="fas fa-landmark"></i>
                        </div>
                        <div class="stat-value">96</div>
                        <div class="stat-label">人生里程碑</div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon">
                            <i class="fas fa-users"></i>
                        </div>
                        <div class="stat-value">58</div>
                        <div class="stat-label">重要人物</div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon">
                            <i class="fas fa-capsules"></i>
                        </div>
                        <div class="stat-value">22</div>
                        <div class="stat-label">时空胶囊</div>
                    </div>
                </div>

                <div class="add-entry-form" id="entryForm">
                    <h3 class="form-title"><i class="fas fa-pen"></i> 新增人生记录</h3>
                    <div class="form-group">
                        <label for="entryTitle">记录标题</label>
                        <input type="text" id="entryTitle" class="form-control" placeholder="输入事件标题...">
                    </div>
                    <div class="form-group">
                        <label for="entryDate">日期</label>
                        <input type="date" id="entryDate" class="form-control">
                    </div>
                    <div class="form-group">
                        <label for="entryContent">记录内容</label>
                        <textarea id="entryContent" class="form-control" rows="4" placeholder="详细描述这个时刻..."></textarea>
                    </div>
                    <div class="form-actions">
                        <button class="btn btn-secondary" id="cancelBtn">取消</button>
                        <button class="btn btn-primary">保存记录</button>
                    </div>
                </div>

                <div class="recent-entries">
                    <div class="entries-header">
                        <h2 class="entries-title">近期时光记录</h2>
                        <a href="#" class="view-all">查看全部 <i class="fas fa-arrow-right"></i></a>
                    </div>

                    <div class="timeline-container">
                        <div class="timeline">
                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年11月20日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-graduation-cap"></i> 获得专业认证</h3>
                                    <p class="timeline-desc">经过三个月的努力学习和准备，终于获得了项目管理专业认证，这是我职业发展中的重要一步。</p>
                                </div>
                            </div>

                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年11月5日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-heart"></i> 侄女出生</h3>
                                    <p class="timeline-desc">今天我的侄女出生了，第一次抱她在怀里，感受到新生命带来的喜悦和感动。</p>
                                </div>
                            </div>

                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年10月15日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-code"></i> 完成人生时光轴项目</h3>
                                    <p class="timeline-desc">经过数月的努力，终于完成了人生时光轴的核心功能开发，这是一个重要的里程碑，记录了我对生命意义的思考。</p>
                                </div>
                            </div>

                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年9月28日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-moon"></i> 与家人共度中秋</h3>
                                    <p class="timeline-desc">在老家与父母一起度过了温馨的中秋节，分享了人生时光轴的概念，他们非常喜欢这个想法。</p>
                                </div>
                            </div>

                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年8月10日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-mountain"></i> 西湖旅行感悟</h3>
                                    <p class="timeline-desc">独自一人在西湖边漫步，思考人生方向，决定开始这个记录人生的项目，让每一刻都有迹可循。</p>
                                </div>
                            </div>

                            <div class="timeline-item">
                                <div class="timeline-date"><i class="fas fa-calendar"></i> 2023年7月22日</div>
                                <div class="timeline-content">
                                    <h3 class="timeline-title"><i class="fas fa-user-graduate"></i> 大学毕业十周年</h3>
                                    <p class="timeline-desc">与大学同学重聚，回顾十年人生变化，深感时光飞逝，激发了我创建人生时光轴的想法。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 移动端导航菜单切换
        const navToggle = document.querySelector('.nav-toggle');
        const navLinks = document.querySelector('.nav-links');

        navToggle.addEventListener('click', () => {
            navToggle.querySelector('i').classList.toggle('fa-bars');
            navToggle.querySelector('i').classList.toggle('fa-times');
            navLinks.classList.toggle('active');
        });

        // 导航链接激活状态切换
        document.querySelectorAll('.nav-link').forEach(link => {
            link.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelectorAll('.nav-link').forEach(el => {
                    el.classList.remove('active');
                });
                this.classList.add('active');

                // 移动端点击后关闭菜单
                if (window.innerWidth <= 768) {
                    navLinks.classList.remove('active');
                    navToggle.querySelector('i').classList.add('fa-bars');
                    navToggle.querySelector('i').classList.remove('fa-times');
                }
            });
        });

        // 新增记录表单切换
        const addEntryBtn = document.getElementById('addEntryBtn');
        const entryForm = document.getElementById('entryForm');
        const cancelBtn = document.getElementById('cancelBtn');

        addEntryBtn.addEventListener('click', () => {
            entryForm.style.display = 'block';
            entryForm.scrollIntoView({ behavior: 'smooth' });
        });

        cancelBtn.addEventListener('click', () => {
            entryForm.style.display = 'none';
        });

        // 卡片悬停效果
        document.querySelectorAll('.stat-card').forEach(card => {
            card.addEventListener('mouseenter', function () {
                this.style.transform = 'translateY(-8px)';
            });

            card.addEventListener('mouseleave', function () {
                this.style.transform = 'translateY(0)';
            });
        });

        // 设置今天的日期为默认值
        const today = new Date();
        const formattedDate = today.toISOString().split('T')[0];
        document.getElementById('entryDate').value = formattedDate;

        // 动画效果增强
        window.addEventListener('scroll', () => {
            const navbar = document.querySelector('.navbar');
            if (window.scrollY > 10) {
                navbar.style.boxShadow = '0 6px 25px rgba(83, 71, 57, 0.25)';
                navbar.style.backdropFilter = 'blur(16px) saturate(180%)';
            } else {
                navbar.style.boxShadow = '0 4px 20px var(--glass-shadow)';
                navbar.style.backdropFilter = 'blur(12px) saturate(180%)';
            }
        });
    </script>
</body>
</html>